<?php
require('lib/verify.php');
require('lib/has_char.php');
require('lib/is_approved.php');
require('lib/is_admin.php');

$_category = "warmath";
$_title = "Admin / Add a Raid";

$raid_system_id = $_POST["system_id"];
$raid_instance = $_POST["instance_id"];
$month = $_POST["month"]+1;
$day = $_POST["day"];
$year = $_POST["year"];

$date_string = "$month/$day/$year 20:00:00";
$raid_time = strtotime($date_string);

$sql = "insert into wm_raids (raid_instance, raid_date, raid_system_id) values ('$raid_instance', FROM_UNIXTIME('$raid_time'), '$raid_system_id')";

$result = $db->query($sql);

$ii = $db->insert_id($result);

reprocessDKP($db, $system["system_id"]);

header("Location: add-credit.php?id=$ii");
?>

